import React from 'react';
import { initGlobalState } from 'qiankun';
import { Routes, Route, Link } from 'react-router-dom';
function App() {
  const actions = initGlobalState({});
  actions.onGlobalStateChange((state, prevState) => {
    console.log('主应用状态变化:', state, prevState);
  });
  const goClick = () => {
    console.log('react子应用');
  }
  return (
    <div className="App">
      <h1>主应用</h1>
      <nav>
        <Link to="/react-app">react子应用</Link>
        <Link to="/vue-app">vue子应用</Link>
      </nav>
      <div id="micro-app-container1"></div> {/* 子应用挂载的容器 */}
      <div id="micro-app-container2"></div> {/* 子应用挂载的容器 */}
    </div>
  );
}

export default App;
